﻿internal static class DefineConstants
{
	public const int FALSE = 0;
	public const int TRUE = 1;
	public const int MR_SUCCESS = 0; //成功
	public const int MR_FAILED = -1; //失败
	public const int MR_IGNORE = 1; //不关心
	public const int MR_WAITING = 2; //异步(非阻塞)模式
#if __x86_64__
	public const string PRId ="I64d";
public const string  PRIX ="I64X";
#else
  public const string  PRId ="d";
  public const string  PRIX ="X";
#endif

	public const int SCREEN_WIDTH = 240;
	public const int SCREEN_HEIGHT = 320;
	public const int VMRP_VER = 20210101;
	public const int MR_FILE_RDONLY = 1; //以只读的方式打开文件。
	public const int MR_FILE_WRONLY = 2; //以只写的方式打开文件。
	public const int MR_FILE_RDWR = 4; //以读写的方式打开文件。
	public const int MR_FILE_CREATE = 8; //如果文件不存在，创建该文件。
	public const int MR_IS_FILE = 1; //文件
	public const int MR_IS_DIR = 2; //目录
	public const int MR_IS_INVALID = 8; //无效(非文件、非目录)
	public const int TS_FT_NORMAL = 0x0000; //常规（倘若用户填0就代表普通绘制）
	public const int TSF_AUTONEWLINE = 0x0008; //绘制区域内自动换行
	public const int TSF_CRLFNEWLINE = 0x0010; //识别 \r \n 自动换行
	public const int TS_FONT_HMARGIN = 0; //两字符间水平间距
	public const int TS_FONT_VMARGIN = 2; //两字符间垂直间距
	public const int CODE_ADDRESS = 0x80000; // ext开始执行的地址
	public const int CODE_SIZE = 1024 * 1024 * 1; // 为ext分配的内存大小
	public const int STACK_SIZE = 1024 * 1024 * 1; // 栈大小
	public const int BRIDGE_TABLE_SIZE = 4096; // 足够了，只是为了4k对齐
	public const int MEMORY_MANAGER_SIZE = 1024 * 1024 * 4;
	public const int READDIR_SHARED_MEM_SIZE = 128;
	public const int MR_TABLE_SIZE = 4 * 146;
	public const int MR_C_FUNCTION_SIZE = 4 * 5;
	public const int DSM_REQUIRE_FUNCS_SIZE = 4 * 51;
	public const int HANDLE_NUM = 64;
	public const int MOUSE_DOWN = 2;
	public const int MOUSE_UP = 3;
	public const int MOUSE_MOVE = 12;
	public const int FONT_DES = 128;

	public const long STACK_ADDRESS = CODE_SIZE + CODE_ADDRESS;// 栈开始地址
	public const long BRIDGE_TABLE_ADDRESS = (STACK_ADDRESS + STACK_SIZE); // ext文件0x0地址处的值(mr_table指针)
	public const long START_ADDRESS = CODE_ADDRESS;
}